<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use Illuminate\Support\Facades\Log;

class IndexController extends Controller
{
    public function testNotify(Request $request)
    {
        $requestData = [
            'url' => $request->fullUrl(),
            'method' => $request->method(),
            'headers' => $request->headers->all(),
            'body' => $request->all(),
            'ip' => $request->ip(),
            'form-data' => $request->allFiles(),
            'image' => $request->file('image')->getMimeType() ?? '',
            'origin-image' => $request->file('image')->getClientOriginalExtension() ?? '',
        ];

        Log::info('测试回调通知', $requestData);

        return response()->json(['code' => 0, 'msg' => 'success']);
    }
}
